$(function () {
    $('.nr-toolbar').toolbar('setFuncs', {

        access: function () {
            var that = this,
                rowid = that.grid.jqGrid('getGridParam', 'selrow');


            if (!rowid) {
                return sy.tip('请选择要授权的记录!', 'warning');
            }



            var url = sy.url({
                a: "access",
                param: { id: rowid }
            });

            var opt = $.extend({
                title: '授权',
                cancel: true,
                // class: "modal-lg",//modal-lg  modal-xl modal-sm
                class: "modal-xl",
                height: 400,
            },
                {}
            );

            sy.open(url, opt);
        },
        webaccess: function () {
            var that = this,
                rowid = that.grid.jqGrid('getGridParam', 'selrow');


            if (!rowid) {
                return sy.tip('请选择要授权的记录!', 'warning');
            }



            var url = sy.url({
                a: "webaccess",
                param: { id: rowid }
            });

            var opt = $.extend({
                title: '授权',
                cancel: true,
                // class: "modal-lg",//modal-lg  modal-xl modal-sm
                class: "modal-xl",
                height: 400,
            },
                {}
            );

            sy.open(url, opt);
        },

    });
})